<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='护理项目-新增',cssPaths='/static/css/services/item/add.css',jsPaths='/static/js/services/items/add.js')">
<div class="right" th:fragment="right">
            <!--面包屑-->
            <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                     <a href="/organization">系统管理</a>
                    <a href="/items">护理项目</a>
                    <a><cite>新增</cite></a>
                </span>
            </div>

            <!--主体内容区-->
            <div class="form-content layui-container">
                    <form class="layui-form" th:action="@{/items/save}" method="post">
                        <div class="layui-form-item">
                            <label class="layui-form-label must">项目名称</label>
                            <div class="layui-input-block">
                                <input type="text" name="name"   lay-verify="required" maxlength="100" placeholder="请输入名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item" th:if="${nature == 2}">
                            <label class="layui-form-label must">项目单价</label>
                            <div class="layui-input-inline">
                                <input type="number" name="price"  min="0"  value="0" oninput="if(value.length>10){value=value.slice(0,10)}else if (value.length==0){value=0} " lay-verify="required" placeholder="请输入单价"  autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">单位：元 不收费项目单价请设置为0</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">项目类型</label>
                            <div class="layui-input-block">
                                <select name="type" lay-verify="required" lay-filter="itemsType">
                                    <option value="1">普通项目</option>
                                    <option value="2">体检项目</option>、
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">简介</label>
                            <div class="layui-input-block">
                                <textarea name="intro" placeholder="项目简介" maxlength="2000" class="layui-textarea"></textarea>
                            </div>
                        </div>
                        <div class="layui-row">
                            <label class="layui-form-label">上传图片</label>
                            <div class="layui-input-block">
                                <div class="layui-upload">
                                    <div class="layui-upload-list">
                                        <img class="layui-upload-img" src="/static/imgs/imgup.png" id="img1">
                                        <input type="hidden" maxlength="500" name="itemImg" class="hiddenIpt">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="hdibox" style="display: none;">
                            <blockquote class="layui-elem-quote layui-quote-nm" style="color:orangered;font-size: 18px;">请选择该体检项目所能产生的健康数据</blockquote>
                            <div class="healthDataItems"></div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="submitBtn">保存</button>
                                <a href="/items" class="layui-btn layui-btn-primary">返回</a>
                            </div>
                        </div>
                    </form>

            </div>
        </div>
</html>